home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 03 - 1987 / 03.09 Sep 87 / leach basic source / Listing 3.text < prev    next >
Encoding:
Text File  |  1987-07-19  |  744 b   |  20 lines  |  [TEXT/EDIT]

  1.  
  2.     ' listing 3  
  3.       ' This small routine reads MacDraw PICT FILES AND displays the     'PICTURE
  4.  
  5.     
  6.     File.Pict$ = FILES$(1,"PICT")                         'Get the FileName
  7.     IF LEN(File.Pict$) < 5 THEN END                        'if no file name then quit
  8.  
  9.     OPEN File.Pict$ FOR INPUT AS #1                     ' open the file for input
  10.     FOR indx% = 1 TO 512                         'read the the first 512 byte header
  11.         tmp$ = INPUT$(1,#1) 
  12.     NEXT       
  13.     PICT$ = INPUT$(LOF(1)-512,#1)    ' read the rest of the file into a string
  14.     CLOSE #1                                        '  close the file
  15.     CLS                                           ' clear the screen and display the picture
  16.     PICTURE , PICT$
  17.  
  18.  
  19.  
  20.